<?php

namespace App\Exceptions;

class CartException extends BaseException
{
    const CODE_1001 = 1001;
    const CODE_1002 = 1002;
    const CODE_1003 = 1003;
    const CODE_1004 = 1004;

    protected int $baseCode = self::BASE_CODE_OF_SPONSOR;    //

    protected array $showMsg = [
        self::CODE_1001 => '商品不存在',
        self::CODE_1002 => '购物车数据刷新，请刷新后重试',
        self::CODE_1003 => '商品失效，请刷新后重试',
        self::CODE_1004 => '商品库存不足，请稍后重试',
    ];

    function __construct($msg = '', $code = 0)
    {
        parent::__construct($msg, $code);
    }
}
